package Entity;


/**
 * This is an entity for the parking lot manager. 
 * @author Sandra Krasko
 */
public class ParkingLotManager extends Worker 
{
	private int parkingLotNum;
	
	/** 
	 * is the constructor. it will call the super constructor and also add the parking lot number that he works on.
	 * @param workerID= the worker id.
	 * @param FirstName= the first name.
	 * @param LastName= the last name.
	 * @param Email= his email.
	 * @param password= his password.
	 * @param parkingLotNumber= the parking lot number that he works on.
	 */
	public ParkingLotManager(String workerID, String FirstName, String LastName, String Email, String password, int parkingLotNumber)
	{
		super(workerID, FirstName, LastName, Email, password , Role.parkingLotManager);
		this.parkingLotNum=parkingLotNumber;
	}
	
	/**
	 * is the validation function. it checks if the parking lot number is between 1 to 6.
	 * @param parkingLotNumber= the parking lot number.
	 * @return true or false if everything ok.
	 */
	public boolean Validate(int parkingLotNumber)
	{
		if (parkingLotNumber<1 || parkingLotNumber>6)
			return false;
		return true;
	}
	
	// the get function.
	public int getParkingLotNum() {
		return parkingLotNum;
	}
	
	// the set function.
	public void setParkingLotNum(int parkingLotNum) {
		this.parkingLotNum = parkingLotNum;
	}
}
